<?php
//MOD: add training tools
//MOD: add image_attachement
//MOD: Add hilited link text
//

?>

<?php get_header(); ?>

<div id="content">
<?php if (have_posts()) { ?>
	<?php the_post(); ?>

		<div class="post">
			<?php $photo = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); 
                        if (!empty($photo)) {?>
			    <div class="bigpic"><a href="<?php echo $photo[0]; ?>"><?php the_post_thumbnail(); ?></a></div> 
		        
                        <?php } ?>
			<div class="right">
				<h1 class="title"><?php echo $linktxt; ?><?php the_title(); ?></a></h1>

				<div class="meta">
					<p class="author">
						<?php the_category(', '); ?> &mdash; 
						<?php ide_option('post_author') ? _e('by ').the_author_posts_link()._e(' &mdash; ') : null; ?>
						<?php the_time(get_option('date_format')); ?>
                                                <?php edit_post_link( '[Edit]', '', ''); do_action('prox_meta_archive',$post->ID); //MOD: add training tools ?>
					</p>
					<?php if (comments_open()): ?>
						<p class="comments"><?php comments_popup_link('0 comments', '1 comment', '% comments', '', ''); ?></p>
					<?php endif; ?>					
					<div class="clear"> </div>
					<?php if(has_tag()) { ?><p class="tags"><?php the_tags(); ?></p><div class="clear"> </div><?php }; ?>
				</div><!-- .meta //-->
				<div class="text">
                                    <?php 
                                         the_content();
                                     ?>
				</div><!-- .text //-->
			
			
				<?php if(ide_option('post_fullmeta')): ?>
				<ul class="postmetadata">
						<li>This entry was posted
						on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
						and is filed under <?php the_category(', ') ?>.</li>

						<?php if ( comments_open() && pings_open() ) {
							// Both Comments and Pings are open ?>
							<li>You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.</li>

						<?php } elseif ( !comments_open() && pings_open() ) {
							// Only Pings are Open ?>
							<li>Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.</li>

						<?php } elseif ( comments_open() && !pings_open() ) {
							// Comments are open, Pings are not ?>
							<li>You can skip to the end and leave a response. Pinging is currently not allowed.</li>

						<?php } elseif ( !comments_open() && !pings_open() ) {
							// Neither Comments, nor Pings are open ?>
							<li>Both comments and pings are currently closed.</li>

						<?php } edit_post_link('Edit this entry','','.'); ?>
				</ul>
				<?php endif; ?>
					
				<?php comments_template(); ?>
			</div><!-- .right //-->
			<div class="clear"> </div>
		</div><!-- .post //-->

<?php } else {
		_e('<h1>Sorry!</h1>Sorry, the requested content was not found.');
	}
?>
</div><!-- content //-->

<?php get_footer(); ?>